IPTABLES syntax help to forward Remote Desktop requests to a VM [CentOS host]

Posted by NVRAM on Super User See other posts from Super User or by NVRAM
Published on 2010-03-04T22:47:41Z Indexed on 2010/04/07 13:03 UTC
Read the original article Hit count: 170

I've a VM running MSWindows XP hosted on my CentOS 5.4 machine.

I can rdesktop into it from the hosting machine and work just fine using the private ddress (192.168.122.65), but I now need to allow Remote Desktop access from other computers (not just the machine hosting the VM).

[Edit] I only need to allow access for a day or so, so don't want to add a NIC (for XP activation reasons).

Could someone help me with the iptables syntax?

The VM is on a private/virtual network: 192.168.122.65 and my CentOS machine is on a physical network, at 10.1.3.38 (and 192.168.122.1 as the GW for the virtual net).

I found this question, but none of the answers seemed to work and I'm a bit timid at blindly trying variations. My FORWARD rules are as listed.

Thanks in advance.

# iptables -L FORWARD
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             192.168.122.0/24    state RELATED,ESTABLISHED 
ACCEPT     all  --  192.168.122.0/24     anywhere            
ACCEPT     all  --  anywhere             anywhere            
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable 
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable 
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

[Edit] If I do play "blindly" is there a simple way to reset the settings on CentOS (a la service network restart)?

© Super User or respective owner

Related posts about iptables

Related posts about networking